package com.hzmg.filter;

import akka.actor.typed.Behavior;
import com.hzmg.route.RouteDefinition;
import org.springframework.core.Ordered;

public class TestFilter implements GatewayFilter, Ordered {

    private static final int XXX_TESTFILTER_OREDER = 1;

    @Override
    public Behavior<Void> filter(RouteDefinition routeDefinition, GatewayFilterChain chain) {
        System.out.println("This is a test filter");
        return chain.filter(routeDefinition);
    }

    @Override
    public int getOrder() {
        return XXX_TESTFILTER_OREDER;
    }
}
